package com.ruoyi.system.service.impl;

import java.util.List;
import cn.hutool.core.util.ObjectUtil;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AOrderMapper;
import com.ruoyi.system.domain.AOrder;
import com.ruoyi.system.service.IAOrderService;

/**
 * vip支付记录Service业务层处理
 *
 * @author gf
 * @date 2024-11-26
 */
@Service
public class AOrderServiceImpl implements IAOrderService {
    @Autowired
    private AOrderMapper aOrderMapper;

    /**
     * 查询vip支付记录
     *
     * @param id vip支付记录主键
     * @return vip支付记录
     */
    @Override
    public AOrder selectAOrderById(Long id) {
        return aOrderMapper.selectAOrderById(id);
    }

    /**
     * 查询vip支付记录列表
     *
     * @param aOrder vip支付记录
     * @return vip支付记录
     */
    @Override
    public List<AOrder> selectAOrderList(AOrder aOrder) {
        return aOrderMapper.selectAOrderList(aOrder);
    }

    /**
     * 新增vip支付记录
     *
     * @param aOrder vip支付记录
     * @return 结果
     */
    @Override
    public int insertAOrder(AOrder aOrder) {
        aOrder.setCreateTime(DateUtils.getNowDate());
        return aOrderMapper.insertAOrder(aOrder);
    }

    /**
     * 修改vip支付记录
     *
     * @param aOrder vip支付记录
     * @return 结果
     */
    @Override
    public int updateAOrder(AOrder aOrder) {
        aOrder.setUpdateTime(DateUtils.getNowDate());
    return aOrderMapper.updateAOrder(aOrder);
    }

    /**
     * 批量删除vip支付记录
     *
     * @param ids 需要删除的vip支付记录主键
     * @return 结果
     */
    @Override
    public int deleteAOrderByIds(Long[] ids) {
        return aOrderMapper.deleteAOrderByIds(ids);
    }

    /**
     * 删除vip支付记录信息
     *
     * @param id vip支付记录主键
     * @return 结果
     */
    @Override
    public int deleteAOrderById(Long id) {
        return aOrderMapper.deleteAOrderById(id);
    }

    /**
     * 批量逻辑删除vip支付记录
     *
     * @param ids 需要删除的vip支付记录主键
     * @return 结果
     */
    @Override
    public int logicDeleteAOrderByIds(Long[] ids) {
        return aOrderMapper.logicDeleteAOrderByIds(ids);
    }
    /**
     * 逻辑删除vip支付记录信息
     *
     * @param id vip支付记录主键
     * @return 结果
     */
    @Override
    public int logicDeleteAOrderById(Long id) {
        return aOrderMapper.logicDeleteAOrderById(id);
    }

}
